﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="User.aspx.cs" Inherits="WMS6.Web.Administration.User" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>User</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
    <script src="../Js/util.js" id="js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>    
    <script src="../Js/Verification.js"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newUser()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "User.aspx?from="+escape(from);
            return false;
        }
           function isSecurity(v){
                if (v.length < 0){iss.reset();return;}
                var lv = -1;
                if (v.match(/[a-z]/ig)){lv++;}
                if (v.match(/[0-9]/ig)){lv++;}
                if (v.match(/(.[^a-z0-9])/ig)){lv++;}
                if (v.length < 6 && lv > 0){lv--;}
                iss.reset();
                switch(lv)
                {                                
                        case 0:
                                iss.level0();
                                break;
                        case 1:
                                iss.level1();
                                break;
                        case 2:
                                iss.level2();
                                break;
                        default:
                                iss.reset();
                }
        }
        var iss = {
                reset:function(){

                document.getElementById("img_div").className = "pwddefault";
                },
                level0:function()
                {
                    document.getElementById("img_div").className = "pwdweak";        
                },
                level1:function(){
                document.getElementById("img_div").className = "pwdmedium";                    
                },
                level2:function(){
                document.getElementById("img_div").className = "pwdstrong";      
                }
            }
        
       function ConfirmPassword()
       {
        if(document.getElementById('txtConfirmPassword').value!="")
        {
          document.getElementById('lblMsg').innerText="";
          if(document.getElementById('txtConfirmPassword').value !=document.getElementById('txtPassword').value )
          {
              document.getElementById('txtConfirmPassword').value='';
               document.getElementById('txtConfirmPassword').focus();
               document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F1200_007") %>';
          }
          }
      }
      function confirmMsg(code) {
          if (code == "F1200_012") {
              if (confirm('<%=GetGlobalMsgResource("F1200_012") %>')) {
                  return true;
              }
              else {
                  return false;
              }
          }
      }
    </script>
</head>
<body>
    <form id="F1021" runat="server" defaultfocus="txtUserID">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblUser" runat="server" CssClass="label_header" 
                            Text="用户" meta:resourcekey="lblUser"></asp:Label></td>
                    <td><asp:Button ID="btnGoBack" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnGoBack%>" 
                            onclick="btnGoBack_Click"   /></td>
                    <td><asp:Button ID="btnNew" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnNew%>"  AccessKey="n" OnClientClick="newUser();" 
                             /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnSave%>" AccessKey="s"  onclick="btnSave_Click" 
                            /></td>
                    <td><asp:Button ID="btnDelete" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnDelete%>"  AccessKey="d" 
                               OnClientClick="javascript:if(confirmMsg('F1200_012'))return true; else return false;" 
                            onclick="btnDelete_Click"   /></td>
                    <td><asp:Button ID="btnCopy" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnCopy%>"  AccessKey="c" onclick="btnCopy_Click" 
                             /></td>
                </tr>
            </table>
        </div>
        
        <asp:UpdatePanel ID="up1" runat="server"><ContentTemplate>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="imgL1"></div>
            </div>
            <div class="tabLabelCont tabCur" id="div1">
                <span id="one1" class="hover">基本信息</span></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="imgR1"></div>
            </div>
        </div>
        
        <div id="div_content">
             <div id="con_one_1" style="display: block;">
                 <table width="720" style="display: block; margin-left: 10px; margin-top: 10px;" >
                     <tr>
                         <td width="180">
                             <asp:Label ID="lblUserID" runat="server" CssClass="label" Text="用户ID" 
                                 meta:resourcekey="lblUserID"></asp:Label><span class="must_input">*</span>
                         </td>
                         <td width="180">
                             <asp:Label ID="lblUserName" runat="server" CssClass="label" Text="用户名" 
                                 meta:resourcekey="lblUserName"></asp:Label><span class="must_input">*</span>
                         </td>
                            <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                       
                     </tr>
                     <tr>
                         <td>
                             <asp:TextBox ID="txtUserID" runat="server" CssClass="textbox" MaxLength="10" 
                                 meta:resourcekey="txtUserID" ></asp:TextBox>
                         </td>
                         <td>
                             <asp:TextBox ID="txtUserName" runat="server" CssClass="textbox" MaxLength="20" 
                                 meta:resourcekey="txtUserName" ></asp:TextBox>
                         </td>
                            <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                     </tr>
                     <tr>
                          <td width="180">
                             <asp:Label ID="lblPassword" runat="server" CssClass="label" Text="密码" 
                                  meta:resourcekey="lblPassword"></asp:Label><span class="must_input">*</span>
                         </td>
                         <td>                         
                         </td>
                         <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                     </tr>
                     <tr>
                           <td>
                             <asp:TextBox ID="txtPassword" onkeyup="isSecurity(this.value);" 
                                   TextMode="Password" runat="server" CssClass="textbox" MaxLength="20" 
                                   meta:resourcekey="txtPassword"></asp:TextBox>
                         </td>
                         <td>
                         <div id="img_div" class="pwddefault"></div>
                         </td>
                         <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                     </tr>
                           <tr>
                          <td width="180">
                             <asp:Label ID="lblConfirmPassword" runat="server" CssClass="label" Text="确认密码" 
                                  meta:resourcekey="lblConfirmPassword"></asp:Label><span class="must_input">*</span>
                         </td>
                         <td>
                         <asp:Label ID="lblExpireDate" runat="server" CssClass="label"  Text="密码过期日期" 
                                 meta:resourcekey="lblExpireDate"></asp:Label>
                         </td>
                            <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                      
                     </tr>
                     <tr>
                           <td>
                             <asp:TextBox ID="txtConfirmPassword"  onblur="ConfirmPassword();"  
                                   TextMode="Password" runat="server" CssClass="textbox" MaxLength="20" 
                                   meta:resourcekey="txtConfirmPassword"></asp:TextBox>
                         </td>
                         <td>
                            <asp:TextBox ID="txtExpireDate" runat="server" CssClass="textbox" 
                                 Enabled="False" meta:resourcekey="txtExpireDate" ></asp:TextBox>
                         </td>
                         <td></td>
                         <td></td>
                            <td></td>
                         <td></td>
                     </tr>
                       <tr style="height:10px;">
                         <td width="180"></td>
                         <td width="180"></td>
                         <td width="180"></td>
                         <td ></td>
                            <td></td>
                         <td></td>
                     </tr>
                     
                  <tr style="height:10px;">
                         <td width="180"></td>
                         <td width="180"></td>
                         <td width="180"></td>
                         <td ></td>
                            <td></td>
                         <td></td>
                     </tr>
                       <tr>
                         <td width="180">
                             <asp:Label ID="lblCity" runat="server" CssClass="label" Text="城市" 
                                 meta:resourcekey="lblCity" ></asp:Label>
                         </td>
                         <td width="180">
                             <asp:Label ID="lblState" runat="server" CssClass="label" Text="省份" 
                                 meta:resourcekey="lblState" ></asp:Label>
                         </td>
                          <td width="180">
                             <asp:Label ID="lblMobile" runat="server" CssClass="label" Text="手机" 
                                  meta:resourcekey="lblMobile" ></asp:Label>
                         </td>
                          <td width="180">
                             <asp:Label ID="lblDepatrment" runat="server" CssClass="label" Text="部门" 
                                  meta:resourcekey="lblDepatrment"  ></asp:Label>
                         </td>  
                            <td></td>
                         <td></td>                     
                     </tr>
                      <tr>
                           <td>
                             <asp:TextBox ID="txtCity" runat="server" CssClass="textbox" MaxLength="25" 
                                   meta:resourcekey="txtCity"  ></asp:TextBox>
                         </td>
                         <td>
                            <asp:TextBox ID="txtState" runat="server" CssClass="textbox" MaxLength="10" 
                                 meta:resourcekey="txtState"  ></asp:TextBox>
                         </td>
                           <td>
                             <asp:TextBox ID="txtMobile" runat="server" CssClass="textbox" MaxLength="20" 
                                   onblur="JavaScript:dataVer._IsMobile(this,'lblMsg')" 
                                   meta:resourcekey="txtMobile"></asp:TextBox>
                         </td>
                         <td>
                            <asp:TextBox ID="txtDepatrment" runat="server" CssClass="textbox" MaxLength="25" 
                                 meta:resourcekey="txtDepatrment" ></asp:TextBox>
                         </td>
                         <td></td>
                         <td></td>
                     </tr>
                       </tr>
                          <tr>
                         <td width="180">
                             <asp:Label ID="lblZip" runat="server" CssClass="label" Text="邮编" 
                                 meta:resourcekey="lblZip"  ></asp:Label>
                         </td>
                         <td width="180">
                             <asp:Label ID="lblCountry" runat="server" CssClass="label" Text="国家" 
                                 meta:resourcekey="lblCountry"  ></asp:Label>
                         </td>
                          <td width="180">
                             <asp:Label ID="lblPhone" runat="server" CssClass="label" Text="电话" 
                                  meta:resourcekey="lblPhone"   ></asp:Label>
                         </td>
                          <td width="180">                          
                         </td>  
                            <td></td>
                         <td></td>                     
                     </tr>
                      <tr>
                           <td>
                             <asp:TextBox ID="txtZip" runat="server" CssClass="textbox" MaxLength="6"  
                                   onblur="JavaScript:dataVer._IsPost(this,'lblMsg')" 
                                   meta:resourcekey="txtZip" ></asp:TextBox>
                         </td>
                         <td>
                            <asp:TextBox ID="txtCountry" runat="server" CssClass="textbox" MaxLength="15" 
                                 meta:resourcekey="txtCountry"  ></asp:TextBox>
                         </td>
                           <td>
                             <asp:TextBox ID="txtPhone" runat="server" CssClass="textbox" MaxLength="20" 
                                   onblur="JavaScript:dataVer._IsPhone(this,'lblMsg')" 
                                   meta:resourcekey="txtPhone"></asp:TextBox>
                         </td>
                         <td>
                         </td>
                         <td></td>
                         <td></td>
                     </tr>
                            <tr>
                         <td width="180" colspan=2>
                             <asp:Label ID="lblAddress" runat="server" CssClass="label" Text="地址" 
                                 meta:resourcekey="lblAddress" ></asp:Label>
                         </td>
                         <td width="180">
                             <asp:Label ID="lblFax" runat="server" CssClass="label" Text="传真" 
                                 meta:resourcekey="lblFax"  ></asp:Label>
                         </td>
                          <td width="180">
                               <asp:Label ID="lblEmail" runat="server" CssClass="label" Text="Email" 
                                   meta:resourcekey="lblEmail"  ></asp:Label>
                         </td>
                          <td>                          
                         </td>  
                           <td>                          
                         </td>                      
                     </tr>
                      <tr>
                           <td  colspan=2 >
                             <asp:TextBox ID="txtAddress" runat="server" CssClass="largetextbox" 
                                   MaxLength="100" meta:resourcekey="txtAddress"></asp:TextBox>
                         </td>
                         <td>
                            <asp:TextBox ID="txtFax" runat="server" CssClass="textbox" MaxLength="20" 
                                 onblur="JavaScript:dataVer._IsFax(this,'lblMsg')" 
                                 meta:resourcekey="txtFax"></asp:TextBox>
                         </td>
                           <td>
                            <asp:TextBox ID="txtEmail" runat="server" CssClass="textbox" MaxLength="50"  
                                   onblur="JavaScript:dataVer._IsMail(this,'lblMsg')" 
                                   meta:resourcekey="txtEmail"></asp:TextBox>
                         </td>
                         <td>
                         </td>
                          <td>
                         </td>
                     </tr>
                      <tr style="height:10px;">
                         <td width="180"></td>
                         <td width="180"></td>
                         <td width="180"></td>
                         <td ></td>
                            <td></td>
                         <td></td>
                     </tr>
                         <tr>
                         <td>
                           <asp:CheckBox ID="chkIsActive" runat="server" CssClass="checkbox" Text="启用" 
                                 Checked="True" meta:resourcekey="chkIsActive" />   
                         </td>
                         <td>
                         <asp:CheckBox ID="chkIsWhUser" runat="server" CssClass="checkbox" Text="仓库用户"  Checked="true"   meta:resourcekey="chkIsWhUser" />  
                         </td>
                         <td></td>
                            <td></td>
                         <td></td>
                         <td></td>
                     </tr>
                     <tr>
                         <td>
                          <asp:CheckBox ID="chkSysCreated" runat="server" CssClass="checkbox" Text="系统创建" 
                                 Enabled="False" meta:resourcekey="chkSysCreated" />
                         </td>
                         <td>
                             <asp:CheckBox ID="chkIsDomainUser" runat="server" CssClass="checkbox" 
                                 meta:resourcekey="chkIsDomainUser" Text="域用户" />
                         </td>
                         <td></td>
                            <td></td>
                         <td></td>
                         <td></td>
                     </tr>
                 </table>
             </div>
         </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnCopy" EventName="Click" />
        </Triggers>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
       <input type="hidden" id="hdnPassword" runat="server" />
    </form>
</body>
</html>
